// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import Character from "../../BASE/Character";
import GeZiManager from "../../Manager/GeZiManager";
import MessageCenter from "../../Message/MessageCenter";
import DXX from "./DXX";

const {ccclass, property} = cc._decorator;

@ccclass
export default class D14 extends DXX {

    target:Character=null;
    TheNumber:string = 'D14';
    Cname:string="仙女吊坠"
k:number=0

    start () {
        this.target=this.node.getComponent(Character);
        this.target.qi3.push(this)
    }
 
Qi3(): void {
    this.target.TNJJ[4]+=this.k

if (this.target.qi>=4) {
   this.k=2 
}else if(this.target.qi>=2){

    this.k=1

}else{ this.k=0}
this.target.TNJJ[4]-=this.k
}
remove(): void {
    GeZiManager.shanchu(this.target.qi3,this)
   
  }
}